package ch03.staticdaili;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
//实现创建代理对象的接口
public class DaiLiShiXian implements InvocationHandler {
  private   Object huoCheZhan;
    public DaiLiShiXian(Object huoCheZhan) {
        this.huoCheZhan=huoCheZhan;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        Object ob = method.invoke(huoCheZhan, args);
        System.out.println("加五块");
        return ob;
    }
}
